3.21.72 \(\int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx\)

Optimal. Leaf size=34 \[ \sqrt {x^2-4 x+3}-\tanh ^{-1}\left (\frac {2-x}{\sqrt {x^2-4 x+3}}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {640, 621, 206} \begin {gather*} \sqrt {x^2-4 x+3}-\tanh ^{-1}\left (\frac {2-x}{\sqrt {x^2-4 x+3}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-1 + x)/Sqrt[3 - 4*x + x^2],x]

[Out]

Sqrt[3 - 4*x + x^2] - ArcTanh[(2 - x)/Sqrt[3 - 4*x + x^2]]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 640

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(a + b*x + c*x^2)^(p +
 1))/(2*c*(p + 1)), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx &=\sqrt {3-4 x+x^2}+\int \frac {1}{\sqrt {3-4 x+x^2}} \, dx\\ &=\sqrt {3-4 x+x^2}+2 \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {-4+2 x}{\sqrt {3-4 x+x^2}}\right )\\ &=\sqrt {3-4 x+x^2}-\tanh ^{-1}\left (\frac {2-x}{\sqrt {3-4 x+x^2}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 30, normalized size = 0.88 \begin {gather*} \sqrt {x^2-4 x+3}+\tanh ^{-1}\left (\frac {x-2}{\sqrt {x^2-4 x+3}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-1 + x)/Sqrt[3 - 4*x + x^2],x]

[Out]

Sqrt[3 - 4*x + x^2] + ArcTanh[(-2 + x)/Sqrt[3 - 4*x + x^2]]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.14, size = 34, normalized size = 1.00 \begin {gather*} \sqrt {x^2-4 x+3}+2 \tanh ^{-1}\left (\frac {\sqrt {x^2-4 x+3}}{x-3}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(-1 + x)/Sqrt[3 - 4*x + x^2],x]

[Out]

Sqrt[3 - 4*x + x^2] + 2*ArcTanh[Sqrt[3 - 4*x + x^2]/(-3 + x)]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 29, normalized size = 0.85 \begin {gather*} \sqrt {x^{2} - 4 \, x + 3} - \log \left (-x + \sqrt {x^{2} - 4 \, x + 3} + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)/(x^2-4*x+3)^(1/2),x, algorithm="fricas")

[Out]

sqrt(x^2 - 4*x + 3) - log(-x + sqrt(x^2 - 4*x + 3) + 2)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 30, normalized size = 0.88 \begin {gather*} \sqrt {x^{2} - 4 \, x + 3} - \log \left ({\left | -x + \sqrt {x^{2} - 4 \, x + 3} + 2 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)/(x^2-4*x+3)^(1/2),x, algorithm="giac")

[Out]

sqrt(x^2 - 4*x + 3) - log(abs(-x + sqrt(x^2 - 4*x + 3) + 2))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 26, normalized size = 0.76 \begin {gather*} \ln \left (x -2+\sqrt {x^{2}-4 x +3}\right )+\sqrt {x^{2}-4 x +3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x-1)/(x^2-4*x+3)^(1/2),x)

[Out]

(x^2-4*x+3)^(1/2)+ln(x-2+(x^2-4*x+3)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.89, size = 29, normalized size = 0.85 \begin {gather*} \sqrt {x^{2} - 4 \, x + 3} + \log \left (2 \, x + 2 \, \sqrt {x^{2} - 4 \, x + 3} - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)/(x^2-4*x+3)^(1/2),x, algorithm="maxima")

[Out]

sqrt(x^2 - 4*x + 3) + log(2*x + 2*sqrt(x^2 - 4*x + 3) - 4)

________________________________________________________________________________________

mupad [B]  time = 1.52, size = 25, normalized size = 0.74 \begin {gather*} \ln \left (x+\sqrt {x^2-4\,x+3}-2\right )+\sqrt {x^2-4\,x+3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x - 1)/(x^2 - 4*x + 3)^(1/2),x)

[Out]

log(x + (x^2 - 4*x + 3)^(1/2) - 2) + (x^2 - 4*x + 3)^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x - 1}{\sqrt {\left (x - 3\right ) \left (x - 1\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)/(x**2-4*x+3)**(1/2),x)

[Out]

Integral((x - 1)/sqrt((x - 3)*(x - 1)), x)

________________________________________________________________________________________